//package com.wky1.wang1.config;
//
//import com.wky1.wang1.Interceptor.InterceptorLanjie;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//@Configuration//配置类
//public class Webconfig implements WebMvcConfigurer {
//    @Autowired//从IOC容器里拿到拦截器定义的类
//    private InterceptorLanjie interceptorLanjie;
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(interceptorLanjie).addPathPatterns("/**").excludePathPatterns("/denglu");//前面是需要拦截所有请求，后面是不需要拦截的请求
//    }
//}
